package com.cDesarrollador.exceptions;



import java.util.ResourceBundle;

public class CodesaExceptions extends Exception {

	private ResourceBundle propSysout;

	public CodesaExceptions() {
		propSysout = ResourceBundle
				.getBundle("co.com.codesa.reintegro.mensajes.sysOutMsg");
	}

	public CodesaExceptions(String exception) {
		super(exception);
	}

	public class NotValidFieldException extends CodesaExceptions {

		private static final long serialVersionUID = 1L;

		public NotValidFieldException(String info) {
			super(propSysout.getString("general_valor_campo") + info + " "
					+ propSysout.getString("general_no_valido"));
		}
	}

	public class EmptyFieldException extends CodesaExceptions {

		private static final long serialVersionUID = 1L;

		public EmptyFieldException(String info) {
			super(propSysout.getString("general_valor_campo") + " " + info
					+ " " + propSysout.getString("general_no_nulo"));
		}
	}

	public class NotValidNumber extends CodesaExceptions {

		private static final long serialVersionUID = 1L;
		public NotValidNumber(String nom) {
			super(propSysout.getString("general_numerico_1") + nom
					+ propSysout.getString("general_numerico_2"));
		}
	}

	public class NotValidSizeNumberEntera extends CodesaExceptions {

		private static final long serialVersionUID = 1L;
		public NotValidSizeNumberEntera(String info, String digitos) {
			super(propSysout.getString("general_valor_campo") + " " + info
					+ ", " + propSysout.getString("general_valor_num") + " "
					+ digitos);
		}
	}

	public class NegativeFieldException extends CodesaExceptions {

		private static final long serialVersionUID = 1L;

		public NegativeFieldException(String info) {
			super(propSysout.getString("general_valor_campo") + info
					+ propSysout.getString("error_valor_negativo"));

		}

	}

	public class NotPercentageException extends CodesaExceptions {

		private static final long serialVersionUID = 1L;

		public NotPercentageException(String info) {
			super(propSysout.getString("general_valor_campo") + info + " "
					+ propSysout.getString("general_no_porcentaje"));
		}

	}

	public class NumberLengthException extends CodesaExceptions {

		private static final long serialVersionUID = 1L;

		public NumberLengthException(String info, String valor) {
			super(propSysout.getString("general_valor_campo") + info + " "
					+ propSysout.getString("general_valor_num") + valor);
		}

	}

	public class DoubleDecimalException extends CodesaExceptions {

		private static final long serialVersionUID = 1L;

		public DoubleDecimalException(String valor, String nombre) {
			super(propSysout.getString("general_valor_campo") + nombre
					+ propSysout.getString("general_decimal_tama o"));
		}
	}

	public class DoubleAjusteException extends CodesaExceptions {

		private static final long serialVersionUID = 1L;

		public DoubleAjusteException(String nombre) {
			super(propSysout.getString("general_ajuste_tama o"));
		}
	}

	public class ClassNotFoundException extends CodesaExceptions {

		private static final long serialVersionUID = 1L;

		public ClassNotFoundException(String info) {
			super(propSysout.getString("FormulaLiquidacion_class_not_found")
					+ " " + info);
		}

	}

	public class NotValidNumberListas extends CodesaExceptions {

		private static final long serialVersionUID = 1L;

		public NotValidNumberListas(String nom) {
			super(propSysout.getString("general_seleccionLista") + " " + nom);
		}
	}

	public class NotValidLenght extends CodesaExceptions {

		private static final long serialVersionUID = 1L;

		public NotValidLenght(String info, String digitos) {
			super(propSysout.getString("general_valor_campo") + " " + info
					+ ", " + propSysout.getString("general_minimo_caracteres")
					+ " " + digitos
					+ propSysout.getString("general_caracteres") + ".");
		}
	}

	public class NotValidNumeroCuenta extends CodesaExceptions {

		private static final long serialVersionUID = 1L;

		public NotValidNumeroCuenta(String info) {
			super(propSysout.getString("general_valor_campo") + " " + info
					+ " " + propSysout.getString("numero_cuenta_invalido"));
		}
	}

	public class NotValidFormatException extends CodesaExceptions {

		private static final long serialVersionUID = 1L;

		public NotValidFormatException(String info) {
			super(propSysout.getString("general_valor_campo") + " " + info
					+ " " + propSysout.getString("general_no_valido"));
		}
	}

	public class NotValidCaracteres extends CodesaExceptions {

		private static final long serialVersionUID = 1L;

		public NotValidCaracteres(String info) {
			super(propSysout.getString("general_valor_campo") + " " + info
					+ " "
					+ propSysout.getString("general_caracteres_invalidos"));
		}
	}

}
